Enable Gradle build and configuration caching#8669
Conversation
Enabling `org.gradle.caching` allows Gradle to reuse task outputs from previous builds, significantly reducing build times for incremental builds. Enabling `org.gradle.configuration-cache` caches the result of the configuration phase, skipping the evaluation of the build script when no configuration changes are detected. These optimizations reduced local build verification time from ~1m 7s to ~46s.
helin24
left a comment
There was a problem hiding this comment.
Note that we may want to get in the habit of running ./gradlew clean more often to avoid getting into weird cache states.
|
@pq The Flutter IJ plugin doesn't use Grammar-Kit (and never will). The Dart IJ Plugin does, a PR like this, flutter/dart-intellij-third-party#180, would prevent any issue with caching. From my experience clearing your cache (thanks you @helin24) is par the course with or without this setting. These are the simplest of the "please do the right thing" kinds of settings for a healthy project. Also keep in mind that the presubmits would catch any bad caching from our local machines as well. |
Good catch. I was getting my repos mixed up! 😬
Could you elaborate? Why cache in places if we're just going to clear it? Do mean specifically for
Cool! Could you explain? Thanks! |
Without cacheing something already, a single build or verify would take an hour or more (think downloading and keeping the IJ platform versions on disk). I mean this honestly more in jest from my own experience, every few weeks it is a requirement with my machines and these projects to clear my own
Our presubmit machines aren't configured to cache across sessions.
|
|
Regarding |
|
Let's land this. If we hit snags w/ |


Enabling
org.gradle.cachingallows Gradle to reuse task outputs from previous builds, significantly reducing build times for incremental builds. Enablingorg.gradle.configuration-cachecaches the result of the configuration phase, skipping the evaluation of the build script when no configuration changes are detected.These optimizations reduced local build verification time from ~1m 7s to ~46s.
Thanks for your contribution! Please replace this text with a description of what this PR is changing or adding and why, list any relevant issues, and review the contribution guidelines below.